'
);
},
generateDiscovery = (roll) => {
return (roll <= 4) ? "Nothing" : (roll === 5) ? "Morning hour." : "Afternoon hour.";
},
generateType = (roll) => {
const type =
(roll === 1) ? "Character" :
(roll === 2) ? "Social (Friendly)" :
(roll === 3) ? "Social (Hostile)" :
(roll === 4) ? "Skill Challenge" :
(roll === 5) ? "Combat (Non-commital)" :
("Combat (Aggressive)");
return type;
},
generateDescription = (type) => {
const character = ["A bad memory of your family", "A good memory of your family", "A faction you strongly agree with", "A faction you strongly disagree with", "A game you like to play", "A happy moment from your childhood", "A monster you don't believe is real", "A person you are afraid of", "A person you couldn't save", "A person you hate", "A person you love", "A person you respect", "A person you want to meet", "A place you would love to visit", "A sad moment from your childhood", "A time you embarrassed yourself", "A time you got away with something", "A time you got a sibling into trouble", "A time you got really drunk", "A time you hurt someone", "A time you made something", "A time you were afraid", "A time you were heroic", "A time you were powerless", "A time you were proud of someone", "A time you were smarter than everyone else", "Are you a dog person or a cat person?", "Are you closer to your mother or your father?", "Food that you think is disgusting", "Something that happened on your last birthday", "Something you are ashamed of", "Something you are proud of doing", "Something you would love to do", "The best dinner you've ever had", "The best gift you ever received", "The funniest thing you've ever seen", "What are you looking forward to?", "What would you do if you were king?", "What would you do with a million gold pieces?", "Where are your family now?", "Who or what would you die for?", "Who was your first kiss?", "Why are you with the party?", "Why would the party fall apart without you?", "Your favourite story", "Your favourite thing about your hometown", "Your favourite way to relax", "Your greatest achievement", "Your greatest fear", "Your last nightmare"];
const friendly = ["A wandering peddler offers you a look at his wares","An old cleric is repairing a small shrine recently damaged by someone or something","A wandering bard shares stories about the locals","A drunken giant is trying to mend a bridge he has broken, but is having trouble with the work","An old woman needs your help to get an unusual pet down from a tree A naked bard asks you for some spare clothes","You find someone passed out and wounded","Two drunk goliaths are wrestling any challengers","A wizard asks if you can help him test a new spell","Two groups of people need your help to settle a bet","You find a small child, lost and alone","Three dwarves challenge the biggest party member to a drinking competition","Two clerics are arguing about who is the best god","A hungry beggar offers you a secret for some food","A guard is training some new recruits and asks you to help demonstrate a few moves","A dying man asks you to help end his pain","A silent monk offers you some food for a story","A bard is trying to write a song but is having trouble with the words and asks you for advice A wagon has overturned and the owner needs help","A kobold challenges you to a game of riddles"];
const hostile = ["A group of racist thugs has an issue with one of your party members because of their appearance","Three guards call you to halt, holding a wanted poster that looks a lot like one of your party","Some highwaymen demand your money or your life","Two groups of people are brawling near an overturned cart, each blaming the other","A giant blocks your path with a makeshift toll gate, demanding an unusual payment","A group of drunk soldiers approach and demand you offer some tribute to the king's men","A person is tied to a stake and surrounded by a silent mob holding torches, led by a fierce cleric","A loud zealot preaching to a mob accuses you of dark heresy against their god","A barbarian, delirious with a berserker rage, thinks you are a foul monster to kill","A petty nobleman accuses you of not showing the proper due respect and demands satisfaction","You stumble across a dead body and a person holding a bloody knife, who says, It wasn't me!","Someone fleeing from a dozen pursuers begs you for protection against harm","An old woman with a knife and foul breath asks you to pay tribute to her god","Three men eating around a campfire offer you some food, but it's not animal meat they're cooking...","A ghost stands in the middle of the road, wailing","A group of hooded cultists emerge, loudly proclaiming that you are the chosen one","A bard is playing beautiful music to a crowd, but all who listen are quickly under her thrall","A wild sorcerer seeks to test a spell on you","A paladin accuses you of performing evil acts and demands you pay for your sins with blood","A furious druid has someone trapped in vines and intends to kill them for desecrating the grove"];
const challenges = ["A broken wagon blocks the way and must be repaired, overturned, or bypassed","A rowdy mob that must be calmed or evaded before they turn on you or some other victim","An overwhelmingly large pack of hungry, wild animals that must be outrun","There is an unfamiliar split in the path and the correct direction must be determined","A glade of flesh-eating plants that must be escaped before they can paralyze you","A broken bridge across a ravine that must be fixed or overcome to progress","A sudden, terrible storm that requires shelter to be found and constructed fast","A band of highwaymen that must be intimidated or out-smarted before things turn ugly","A magical illusion blocks the way and must be disabled or bypassed to progress","Recent weather has destroyed some notable landmarks and the path must be rediscovered"];
const discoveries = ["An old and ruined tower","A burned out home","A howling cavern","A small, tightly locked chest","A statue of a good deity","A statue of an evil deity","A circle of stone pillars","A giant tree with far-reaching roots","A ruined temple to an unknown god","A cracked, stone fountain filled with a green ooze","A strange pillar carved with bloody runes","A strange, twisted tree","An abandoned wagon and the signs of battle","A small, unlocked hut with a warm hearth"," A locked door in the side of a hill","A chilling cemetery","A locked door in the side of a hill","An abandoned ruin of a castle","A wrecked, half-buried pirate ship"," A set of steps leading down into a crypt","A strange plant with an alluring scent","A rusted cauldron still warm to the touch","A tiny door in the foot of a tree","A beautiful glade with delicious-looking fruit","A sealed, metal coffin","A twisted pillar with an evil, carved face","A book on a bloody altar","A sword impaled in a monstrous stone statue","A map pinned to a tree with a black knife","A blood-red stone embedded in a twisted tree","A skeleton holding a small, red book","A hole in the ground where singing can be heard","A monument to an ancient battle","A giant skeleton of a long-dead gargantuan creature"," An abandoned, boarded-up house with ghostly wails","A stone archway covered in eldritch runes","A pool of sweet, red water","A glade of trees that ooze black sap","A collection of life-like humanoid stone statues","A secret wishing pool","A sleeping dragon","A half-buried chest surrounded by skeletons","7 rotating pillars of segmented red stone","A tree that burns with unnatural green fire","The ruins of a magical experiment gone wrong","A gazebo"];
const desc =
(type === "Character") ? randomArray(character) :
(type === "Social (Friendly)") ? randomArray(friendly) :
(type === "Social (Hostile)") ? randomArray(hostile) :
(type === "Skill Challenge") ? randomArray(challenges) :
(type === "Combat (Non-commital)") ? "The party is attacked, but the enemies will flee easily." :
(type === "Combat (Aggressive)") ? "The party is attacked and the enemies will fight to near death." :
randomArray(discoveries) ;
return desc;
},
//BOONES & CONSEQUENCES
ddBoonConsquence = (type) => {
const array = (type === "Boon") ?
["You restore some hit points","You gain a hit die","You find some extra gold","You gain a favour from an ally","You regain a spell slot","You deal extra damage","You heal some mental stress","You may spend a hit die to recover some hit points","You may switch places with a nearby ally","You can move to an advantageous position","You learn a piece of rare information","You (temporarily) lose one level of exhaustion","A magic item regains one charge","The locals hear about your achievement","You apply a condition to your enemy","A god notices your achievement","A condition improves","You gain advantage to your next roll","Your enemies are intimidated by you","You move your enemy"] :
["You or an ally take damage","An enemy reacts and takes an action","You gain some mental stress","Take a notch on your weapon/armor/item","You lose an item","One of your conditions worsens","Your torch goes out","An NPC becomes hostile to you","You lose some gold","You learn some misinformation","Your enemy becomes enraged","You gain the attention of the local guards","You drop your weapon","You stop and fall prone","You are poisoned or diseased","You are imprisoned","A crowd turns against you","A higher authority learns of your misdoings","A god punishes you","You lose some ammunition or hit dice"];
outputDegree(array, type);
},
outputDegree = (array, degree) => {
const description = randomArray(array);
const output = `